package net.zhengxinyun.performance.mapper.incentive;

import net.zhengxinyun.performance.App.dto.IncentiveDTO;
import net.zhengxinyun.performance.entity.IncentiveEntity;
import net.zhengxinyun.performance.filter.IncentiveFilter;
import net.zhengxinyun.performance.filter.IndexFilter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface IncentiveEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_incentive
     *
     * @mbg.generated Mon Dec 03 17:12:02 CST 2018
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_incentive
     *
     * @mbg.generated Mon Dec 03 17:12:02 CST 2018
     */
    int insert(IncentiveEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_incentive
     *
     * @mbg.generated Mon Dec 03 17:12:02 CST 2018
     */
    int insertSelective(IncentiveEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_incentive
     *
     * @mbg.generated Mon Dec 03 17:12:02 CST 2018
     */
    IncentiveEntity selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_incentive
     *
     * @mbg.generated Mon Dec 03 17:12:02 CST 2018
     */
    int updateByPrimaryKeySelective(IncentiveEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_incentive
     *
     * @mbg.generated Mon Dec 03 17:12:02 CST 2018
     */
    int updateByPrimaryKey(IncentiveEntity record);

    List<IncentiveFilter> query(IncentiveFilter filter);

    int queryForCount(IncentiveFilter filter);

    List<IncentiveFilter> queryGroupType(@Param("dateTime") String dateTime);

    List<IncentiveFilter> queryGroupMonth(@Param("dateTime") String dateTime);

    List<IncentiveFilter> queryForAudit(IncentiveFilter filter);

    int queryForAuditCount(IncentiveFilter filter);

    List<IncentiveFilter> indexIncentive(IndexFilter indexFilter);

    String queryForNewTime();

    Integer indexForCount(IndexFilter indexFilter);

    Double indexForScore(IndexFilter indexFilter);

    List<IncentiveDTO> typeScores( @Param(value = "dateTime") String year,@Param(value = "departCode") String deparCode);
}